package com.woniuxy02;

import java.util.Scanner;

/**
 * @author 作者
 * @create 2025-05-22 14:06
 */
public class Test10 {
    public static void main(String[] args) {
//        int a=1,b=2;
//        System.out.println(a==b);
//        System.out.println("aaa"=="aaa");
        String s1="aaa";
        String s2="aaa";
        String s3=new String("aaa");
        String s4=new String("aaa");
        System.out.println("s1=="+s1);
        System.out.println("s2=="+s2);
        System.out.println("s3=="+s3);
        System.out.println("s4=="+s4);
        System.out.println("s1==s2="+(s1==s2));
        System.out.println("s3==s4="+(s3==s4));
        System.out.println("字符串比较相等调用equals()方法");
        System.out.println(s1.equals(s2));
        System.out.println(s3.equals(s4));
    }
}
